package com.tvsinfo.jdk.demo.case8_fork_join;

import org.omg.CORBA.TIMEOUT;

import java.util.*;
import java.util.concurrent.TimeUnit;

/**
 * 模拟sql查询
 */
public class SQLSelectDao {

    /**
     * 查询订单列表
     */
    public List selectOrderInfoList(int start,int end) {
        System.out.println("查询start:"+start+" end:"+end+"  id:" + Thread.currentThread().getId() + " , name:" + Thread.currentThread().getName());
        try {
            TimeUnit.MILLISECONDS.sleep(100L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        List<Map<Integer,Integer>> list=new ArrayList();
        Map<Integer,Integer> map=new HashMap<>();
        map.put(start,end);
        list.add(map);
        return list;
    }


    /**
     * 查询订单列表
     */
    public List selectOrderDetail() {


        return null;
    }

}
